package ace.module.account.core.impl.manager;

import ace.module.account.api.model.dto.IamAccountProfileDto;
import ace.module.account.api.model.input.IamAccountCommonInfoInput;
import ace.module.account.core.impl.dao.entity.IamAccount;
import ace.module.account.core.impl.dao.entity.IamAccountProfile;
import ace.module.common.core.impl.manager.EntityOfAppManager;
import java.util.List;
import java.util.Map;

/**
 * .
 * @author Caspar
 */
public interface IamAccountProfileManager
    extends EntityOfAppManager<IamAccountProfile, Long, IamAccountProfileDto> {

  IamAccountProfileDto getDtoByAccountIdAndDeleteFlagIsFalse(Long accountId);

  IamAccountProfile getByAccountIdAndDeleteFlagIsFalse(Long accountId);

  /**
   *
   * @param iamAccountIdList account id
   * @return key=account id value={@link IamAccountProfileDto}
   */
  Map<Long, IamAccountProfileDto> getAccountIdAndProfileDtoMapByAccountId(List<Long> iamAccountIdList);

  List<IamAccountProfileDto> getDtoByAccountId(List<Long> iamAccountIdList);

  List<IamAccountProfile> getByAccountId(List<Long> iamAccountIdList);

  void insertOrUpdate(Long accountId, Long iamAppId, IamAccountCommonInfoInput common);

  void addOrModify(IamAccount iamAccount,
      String nickName,
      String avatar,
      String realName,
      Integer sex,
      Long birthday,
      String signature,
      String contactInfo,
      Integer registerSourceFrom
  );
}
